﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using System.Linq;
using System.Text;

namespace WCLOnlineExam.Models
{
    [DisplayColumn("Name", "Name")]
//    [EntityAuthentication(AllowAnonymous = false, ViewRolesRequired = new string[] { "Admin" })]
    public class UserGroup : EntityBase
    {

        [Display(Name = "名称", Order = 10)]
        [Required]
        public virtual string Name { get; set; }

        [Display(Name = "权限", Order = 10)]
        [Required]
        public virtual UserPower Power { get; set; }

        [Hide]
        public virtual ICollection<User> Users { get; set; }

    }
    public enum UserPower
    {
        Admin = 0,
        Normal = 1
    }
}
